package ru.papergames.battleserver.network.serverpackets.webserver;

import ru.papergames.battleserver.model.PaperGameFlashUser;

/**
 * User: atroshanin
 * Date: 15.11.2010
 * Time: 13:55:12
 */
public class FlashUserConnected extends WebServerServerPacket {

    private long playerId;

    public FlashUserConnected(PaperGameFlashUser usr) {
        this.playerId = usr.getId();
    }

    @Override
    protected void writePacketId() {
        writeC(FLASH_USER_CONNECTED_PACKET_ID);
    }

    @Override
    protected void writePacketData() {
        writeQ(playerId);
    }

    @Override
    public String getType() {
        return "[s] FlashUserConnected[" + FLASH_USER_CONNECTED_PACKET_ID + "]";
    }
}
